home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1663 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: fas-news.harvard.edu!usenet
  2. From: Michael Barrientos <mbarrien@mbarrien.student.harvard.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: An incredably dumb question
  5. Date: Mon, 15 Jan 1996 22:41:25 -0500
  6. Organization: Harvard University
  7. Message-ID: <30FB1E65.2BC45E4@mbarrien.student.harvard.edu>
  8. References: <4d8tlk$pgk@ccnet3.ccnet.com> <4dc5d2$13m@news.infi.net>
  9. NNTP-Posting-Host: mbarrien.student.harvard.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b4 (X11; I; Linux 1.2.13 i586)
  14. CC: felinoid@ccnet.com
  15.  
  16. Greg DiGiorgio wrote:
  17. > In article <4d8tlk$pgk@ccnet3.ccnet.com>, felinoid@ccnet.com says...
  18.  
  19. > >        Here is my question....
  20. > >I am looking for an alternitive to getc()   I want to read carciters
  21. > >as they are entered NOT after the user hits return.
  22. > >I feal so stupid that I can't find it myself or figure it out...
  23. >  
  24. > *** Well, if it was a snake, it would still be hidden. So... what you
  25. > *** want to do is platform specific. That is, you want to read each
  26. > *** character as it is typed, not after the user presses <ENTER>.
  27. > *** With Turbo or Borland C/C++, the function you want is "getch". It
  28. > *** is prototyped in "conio.h" which is where all OS-specific console i/o
  29. > *** functions go. If you're not using Borland, I don't know what MS calls
  30. > *** it. If you're not programming MS-DOS, then I can't help either.
  31.  
  32. If you are using UNIX there is the curses library.  Do a man curses
  33. and read on, what you are trying to do is very simple.  You may also
  34. want to pick up "Programming with Curses" by John Strang, (O'Reilly)
  35. a great 60 page intro.
  36.  
  37. good luck,
  38.  
  39. Mike
  40.